<?
/**
 * 发表新文章页
 * 
 * @copyright Copyright (c) 2008 sdmblog (http://www.sdmblog.cn)
 * @author sdomain(sdomain@live.cn)
 * @version newarticle.php Sun May 18 14:08:45 CST 2008 php $
 */
include_once('include/common.inc.php');
require_once ("./xajax/inc/xajax.inc.php");
include_once('model/index.model.php');
$logininfo = islogin();
if ($logininfo==0) {
	alert('你没有登录或登录超时,请重新登录!','/'.$virdir.'index.php');
}
$index = new model_index();
$categorylist = $index->getCategoryList();
$smarty->assign('categories',$categorylist);

//ajax处理保存发表的文章
$xajax = new xajax('/'.$virdir.'class/article.class.php');

//保存新文章
$xajax->registerFunction('newArticle');
$ajaxscript=$xajax->getJavascript('/'.$virdir.'xajax/inc/');
$smarty->assign('ajaxscript',$ajaxscript);
$smarty->display('newarticle.tpl');
?>